#ifndef RPC_POLL_THREAD_POOL_H_
#define RPC_POLL_THREAD_POOL_H_

#include "base/base.h"

namespace rpc {
class EventManager;

class EventManagerPool {
  public:
    explicit EventManagerPool(EventManager* base_poll);
    ~EventManagerPool();

    EventManager* getPoller();

    bool Start();

  private:
    Mutex mutex_;
    uint32 index_;
    std::vector<EventManager*> ev_mgrs_;

    EventManager* base_mgr_;

    DISALLOW_COPY_AND_ASSIGN(EventManagerPool);
};

}

#endif
